/**
 * 升级api
 */
import { axios } from '@/utils/request';
const hardcodeUrl = '';
const api = {
  escalate: hardcodeUrl + 'msg/upgrade-notice',
};

/**
 * 获取升级列表
 * @param {*} params
 */
export function getEscalateList(params) {
  return axios({
    url: api.escalate + '/list',
    method: 'get',
    params
  });
}

/**
 * 获取升级详情
 * @param {*} params 
 */
export function getEscalate(params) {
  return axios({
    url: api.escalate,
    method: 'get',
    params
  });
}

/**
 * 创建升级
 * @param {*} data 
 */
export function createEscalate(data) {
  return axios({
    url: api.escalate,
    method: 'post',
    data
  });
}

/**
 * 更新升级
 * @param {*} data 
 */
export function updateEscalate(data) {
  return axios({
    url: api.escalate,
    method: 'put',
    data
  });
}

/**
 * 删除升级
 * @param {*} params 
 */
export function deleteEscalate(params) {
  return axios({
    url: api.escalate,
    method: 'delete',
    params
  });
}

/**
 * 验证表单
 * @param {*} params 
 */
export function validateEscalate(params) {
  return axios({
    url: api.escalate + '/unique',
    method: 'get',
    headers: { validate: true },
    params
  });
}